package nirvana.core.bean.json.file.filePathList;

import com.fasterxml.jackson.core.JacksonException;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.databind.JsonDeserializer;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.stereotype.Component;

import java.io.IOException;
import java.util.List;

/**
 * 【描 述】：处理list中存放的图片路径
 * 【环 境】：J2SE 11
 * 【详 细】：
 *
 * @author 李松林
 * @version v1.0 2023-02-01 新建
 * @since 2023-02-01
 */
@Component
@ConditionalOnProperty(value = "fileStorageModel",havingValue = "oss")
public class OssFilePathListDeserializer extends JsonDeserializer<List<String>> {
    @Override
    public List<String> deserialize(JsonParser p, DeserializationContext ctxt) throws IOException, JacksonException {
        List<String> paths = (List<String>) p.getCurrentValue();

        return null;
    }
}
